<% #endcoding:utf-8%>
<%if !current_user?(uid)%>
    <%if !session[:user_id].nil?%>
        <%if userinfo.following?(@user)%>
            <%=link_to '取消关注','javascript:void(0)',:class=>'btn btn-default',:onclick=>'unfollow('+uid.to_s+',this)'%>
        <%else%>
            <%=link_to '加关注','javascript:void(0)',:class=>'btn btn-default',:onclick=>'follow('+uid.to_s+',this)'%>
        <%end%>
    <%else%>
        <%=link_to '加关注',login_path,:class=>'btn btn-default'%>
    <%end%>
<%end%>